﻿using System;

namespace DigitalQuran
{
    /// <summary>
    /// Qur'an Objects
    /// </summary>
    public enum QuranObjectType : byte
    {
        /// <summary>
        /// Qur'an Station
        /// </summary>
        Station,
        /// <summary>
        /// Qur'an Part
        /// </summary>
        Part,
        /// <summary>
        /// Qur'an Quarter
        /// </summary>
        Quarter,
        /// <summary>
        /// Qur'an Group
        /// </summary>
        Group,
        /// <summary>
        /// Qur'an Chapter
        /// </summary>
        Chapter,
        /// <summary>
        /// Qur'an Bowing
        /// </summary>
        Bowing,
        /// <summary>
        /// Qur'an Verse
        /// </summary>
        Verse,
        /// <summary>
        /// Qur'an Word
        /// </summary>
        Word,
        /// <summary>
        /// Qur'an Word's Part
        /// </summary>
        WordPart,
        /// <summary>
        /// Qur'an Word Letter
        /// </summary>
        Letter,
        /// <summary>
        /// Qur'an Prostration
        /// </summary>
        Prostration,
        /// <summary>
        /// Qur'an Page
        /// </summary>
        Page,
        /// <summary>
        /// Complete Qur'an
        /// </summary>
        Book,
    }

    /// <summary>
    /// Represent a Quran Object
    /// </summary>
    public interface IQuranObject
    {
        /// <summary>
        /// Gets the Number of <see cref="DigitalQuran.IQuranObject"/> in <see cref="DigitalQuran.Book"/>
        /// </summary>
        int GlobalNumber { get; }

        /// <summary>
        /// Gets Specified Qur'an Object
        /// </summary>
        /// <param name="objType">Type of object to get</param>
        /// <param name="index">Index of Object</param>
        /// <returns></returns>
        IQuranObject GetObject(QuranObjectType objType, int index);

        /// <summary>
        /// Get the Count of Specified <see cref="DigitalQuran.QuranObjectType"/>
        /// </summary>
        /// <param name="objType">QuranObjectType of which to get count</param>
        /// <returns>Returns Count of Sepecified <see cref="DigitalQuran.QuranObjectType"/> if it contains specified <see cref="DigitalQuran.QuranObjectType"/> else returns -1</returns>
        int GetCount(QuranObjectType objType);

        /// <summary>
        /// Gets the Qur'an Text for specified text mode
        /// </summary>
        /// <param name="textMode">name of text mode</param>
        /// <returns>Returns Qur'an Text for this object</returns>
        string ToString(string textMode);
    }
}